home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / newsgroups / misc.19990422-19990725 / 000201_news@columbia.edu _Tue Jun 22 12:33:19 1999.msg < prev    next >
Internet Message Format  |  1999-07-23  |  3KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id MAA04701
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Tue, 22 Jun 1999 12:33:12 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id MAA21719
  7.     for kermit.misc@watsun.cc.columbia.edu; Tue, 22 Jun 1999 12:10:53 -0400 (EDT)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: Reading data from COM port
  11. Date: 22 Jun 1999 12:10:44 -0400
  12. Organization: Columbia University
  13. Message-ID: <7koci4$qbu@watsun.cc.columbia.edu>
  14. To: kermit.misc@columbia.edu
  15.  
  16. In article <7ko6ct$a5d$1@nnrp1.deja.com>,
  17. quertyq@hotmail.com  <quertyq@hotmail.com> wrote:
  18. : I have a situation where I need to hook up a PC and a report-generating
  19. : device via a serial cable between the com ports.
  20. : When the device prints a report, I need the PC ( running kermit ) to
  21. : capture the data exactly, and output the data to a file on the PC.
  22. Which Kermit program are you using?
  23.  
  24. : Now I know the procedure for log session, and stuff like that, but I
  25. : need to write a script so this is done _unattended_.  This seems to
  26. : be a problem. I've tried to log session and it will not log the output
  27. : until I manually connect -- no good.
  28. : I have tried to "input 0 \10" to wait for the line feed to capture
  29. : using the input buffer, but this too seems futile.  The buffer
  30. : changes the output, and the "clear input-buffer" did not solve the
  31. : problem. Again, the integrity of the data being captured is critical
  32. : to the other programs working.
  33. I'm not sure I understand the problem you're describing.  If you want to
  34. capture and write a line at a time, you can do it like this (exact syntax
  35. might vary, depending on Kermit program and version):
  36.  
  37.   open write <filename>
  38.   if fail <do_something>
  39.   (do anything necessary to set up far end here)
  40.   while true {
  41.       clear input
  42.       input 0 \10
  43.       write file \v(input)     
  44.   }
  45.  
  46. : I've worked with Kermit before, and after much bragging to my boss,
  47. : I'm in a bit of a pickle right now.  Between my boss on one shoulder,
  48. : and the deadline on the other ... <ahem>  HELP!
  49. Anyway, the trick is usually something like:
  50.  
  51.   (make connection)
  52.   log session <filename>
  53.   input 9999 xxxxx
  54.  
  55. where "9999" is how many seconds you want to do this for, and "xxxxx" is
  56. either some string that will never come, or a string that, if it comes,
  57. should terminate the logging.
  58.  
  59. - Frank